

#pragma once

class IPtrFunc: public LogicPtrFunc<IPtrFunc, DWORD, DWORD, DWORD>
{
public:
	IPtrFunc(){}
	virtual ~IPtrFunc(){}

	virtual bool Register()=0;
	virtual bool Excute(const DWORD& index, DWORD dummy1, DWORD dummy2, DWORD dummy3)
	{
		return LogicPtrFunc<IPtrFunc, DWORD, DWORD, DWORD>::Excute( index, dummy1, dummy2, dummy3);
	}

	virtual void OnHandleMsg(const DWORD& index, DWORD dummy1, DWORD dummy2, DWORD dummy3);
#ifdef REG_FUNC
#undef REG_FUNC
#endif

#define REG_FUNC REG_PTRFUNC
	#include "PtrFuncList1.h"
	#include "PtrFuncList2.h"
};


class PtrFuncList1 : public IPtrFunc
{
	LOGIC_CLASS(IPtrFunc);
public:
	PtrFuncList1(){}
	virtual ~PtrFuncList1(){}

	virtual bool Register()
	{
#ifdef REG_FUNC
#undef REG_FUNC
#endif

#define REG_FUNC(type) if(!Insert( e##type,  &LogicPtr::type)) return false;
#include "PtrFuncList1.h"
		return true;
	}
};

class PtrFuncList2 : public IPtrFunc
{
	LOGIC_CLASS(IPtrFunc);
public:
	PtrFuncList2(){}
	virtual ~PtrFuncList2(){}

	virtual bool Register()
	{
#ifdef REG_FUNC
#undef REG_FUNC
#endif
#define REG_FUNC(type) if(!Insert( e##type,  &LogicPtr::type)) return false;
#include "PtrFuncList2.h"
		

		return true;
	}
};
